#ifndef __UI_BEGIN_LAYOUT_H__
#define __UI_BEGIN_LAYOUT_H__
#include "cocos2d.h"
#include "../include/SignalSlot.h"
USING_NS_CC;
namespace fishingjoy
{
	namespace ui
	{
		class UI_BeginLayout:public CCLayer
		{
		public:
			base::Signal<void(void)> Event_BeginGame;
			base::Signal<void(void)> Event_ExitGame;
		public:
			UI_BeginLayout()
			{
				//begin button.
				CCMenuItemImage* pBeginGame = CCMenuItemImage::create("ui/game_start.png","ui/game_start2.png",this,menu_selector(UI_BeginLayout::onMenu_Begin));
				pBeginGame->setPositionY(-40);
				//exit button.
				CCMenuItemImage* pExitGame = CCMenuItemImage::create("ui/game_exit.png","ui/game_exit2.png",this,menu_selector(UI_BeginLayout::onMenu_Exit));
				pExitGame->setPositionY(-80);
				//add all of buttons into menu.
				CCMenu* pMenu = CCMenu::create(pBeginGame,pExitGame,NULL);
				//attach to ui node.
				addChild(pMenu);
			}
		private:
			void onMenu_Begin(CCObject* pSender)
			{
				Event_BeginGame();
			}
			void onMenu_Exit(CCObject* pSender)
			{
				Event_ExitGame();
			}
		};
	}
}
#endif